package com.bocweb.fly.jiaodao.adapter;

import android.content.Context;
import android.support.v7.widget.RecyclerView;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.LinearLayout;
import android.widget.TextView;

import com.bocweb.fly.jiaodao.R;
import com.bocweb.fly.jiaodao.utils.CircularImage;
import com.bumptech.glide.Glide;


/**
 * Created by fly on 16/10/11.
 */

public class MyCreateAdapter extends RecyclerView.Adapter<MyCreateAdapter.MyViewHolder> {


    public interface OnItemClickLitener {
        void onItemClick(View view, int position);
    }

    public void setOnItemClickLitener(OnItemClickLitener mOnItemClickLitener) {
        this.mOnItemClickLitener = mOnItemClickLitener;
    }

    private OnItemClickLitener mOnItemClickLitener;
    private Context context;

    public MyCreateAdapter(Context context) {
        this.context = context;
    }

    @Override
    public MyViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
        MyViewHolder viewHolder = new MyViewHolder(LayoutInflater.from(
                context).inflate(R.layout.item_my_create, parent,
                false));
        Glide.with(context)
                .load(R.mipmap.ic_photo)
                .placeholder(R.mipmap.ic_photo)
                .into(viewHolder.civPhoto);
        return viewHolder;
    }

    @Override
    public void onBindViewHolder(final MyViewHolder holder, int position) {

    }

    @Override
    public int getItemCount() {
        return 10;
    }

    class MyViewHolder extends RecyclerView.ViewHolder {

        CircularImage civPhoto;

        public MyViewHolder(View view) {
            super(view);
            civPhoto = (CircularImage) view.findViewById(R.id.cover_user_photo);
           /* tvName = (TextView) view.findViewById(R.id.name);
            tvSign = (TextView) view.findViewById(R.id.tv_sign);
            tvGuanzhu = (TextView) view.findViewById(R.id.tv_guanzhu);
            llDismiss = (LinearLayout) view.findViewById(R.id.ll_dismiss);
            llYJ = (LinearLayout) view.findViewById(R.id.ll_yj);
           */
        }
    }
}
